<div id="role-manage-view">
  <!--<div class="pageheader">-->
    <!--<h2><i class="fa fa-home"></i>角色管理</h2>-->
    <!--<div class="al-header-right">-->
      <!--<button type="button" class="btn btn-primary" ng-click="newData()">新建角色</button>-->
    <!--</div>-->
  <!--</div>-->
  <div class="page">
    <div class="al-list-container">
      <form class="form-horizontal al-search-container" role="form">
        <div class="form-group">
          <label class="col-sm-2 control-label">角色名称</label>
          <div class="col-sm-3">
            <input class="form-control" ng-model="search.name" type="text" placeholder=""/>
          </div>
          <label class="col-sm-1 control-label">类型</label>
          <div class="col-sm-2">
            <select ng-model="search.type" class="form-control"
                    ng-options="item.value as item.name for item in typeList">
            </select>
          </div>
          <div class="col-sm-1">
            <button type="button" ng-click="queryData()" class="btn btn-success al-float-right">查询</button>
          </div>
          <div class="col-sm-1">
            <button type="button" ng-click="resetSearch()" class="btn btn-default">重置</button>
          </div>
          <div class="col-sm-1">
          </div>
          <div class="col-sm-1">
            <button type="button" class="btn btn-primary" ng-click="newData()">新建</button>
          </div>
        </div>
      </form>
      <table ng-table="tableParams"
             class="table  table-bordered table-striped table-condensed al-table-container">
        <thead>
        <tr>
          <td>角色名称</td>
          <td>描述</td>
          <td>类型</td>
          <td>状态</td>
          <td>操作</td>
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="item in $data">
          <td>{{item.name}}</td>
          <td>{{item.description}}</td>
          <td>{{item.type|constantTransfer:typeList}}</td>
          <td>{{item.enabled|constantTransfer:enabledList}}</td>
          <td>
            <button class="btn btn-warning btn-sm" ng-click="setData(item)">编辑</button>
            <!--<button class="btn btn-info btn-sm" ng-click="setData(item)">配置</button>-->
          </td>
        </tr>
        </tbody>
      </table>
    </div>
  </div>
</div>
